package com.gary.spring.webContainer.A02;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author peng_rui
 * @date 2022/7/12
 */
@RestController
public class MyController2 {

    @RequestMapping(value = "/my-controller2-test/{id}", method = RequestMethod.GET)
    public String testParam(
            @RequestParam("name") String name,
            @RequestParam("age") Integer age,
            String name2,
            @PathVariable("id") Long id
    ) {
        System.out.println("testParam success");
        return "success";
    }
}
